@import '../styles/util.sass';

.Home {
  // text-align: center;
  background-color: $bg-body;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.Home-logo {
  // ToDo:用了vmin后刷新页面的起始位置总是变
  height: 40vmin;
  pointer-events: none;
}

.Home-title {
  color: $text-default;
}

@media (prefers-reduced-motion: no-preference) {
  .Home-logo {
    animation: Home-logo-spin infinite 20s linear;
  }
}

.Home-header {
  display: block;
  flex: 1;
  position: relative;
  min-height: 100vh;
  // max-height: 100vh;
  // display: flex;
  // flex-direction: column;
  // align-items: center;
  // justify-content: center;
  font-size: calc(1px + 2vmin);
  overflow: auto;

  > section:first-child {
    height: 100vh;
    @include flex-xy-center;
    flex-direction: column;
  }
}

.Home-header-bottom {
  @include flex-xy-center;
  font-size: 1rem;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  color: $text-mute;
  cursor: pointer;
}

.Home-header-bottom-icon {
  display: flex;
  flex-direction: column;
  margin-right: 4px;
}

.Home-header-bottom-icon > div {
  height: 5px;
  width: 5px;
  border-top: 1px solid $icon-default;
  border-left: 1px solid $icon-default;
  transform: rotate(45deg) translateY(3px);
}

.Home-header-form {
  @include flex-xy-center;
  flex-direction: column;
  margin: 0 auto;
  padding: 30px 0;
  overflow: auto;
}

.Home-header-form > *:not(:last-child) {
  margin-bottom: 15px;
}

input {
  width: 200px;
  line-height: 1.3;
  padding: 6px 12px;
  background-color: $bg-body;
  border-radius: 2px;
  border: 1px solid $input-border-color;
  font-size: 0.875rem;
  color: $text-default;
  -webkit-Homeearance: none;
  height: $input-height;
  margin: 0;
}

input::-webkit-input-placeholder {
  color: $input-placeholder-color;
  opacity: 0.8;
}

input:disabled {
  color: $input-disabled-color;
  background-color: $input-disabled-bg-color;
}

ul {
  padding: 0;
  list-style: none;
  box-sizing: border-box;
  margin: 0;
  width: 100px;
  height: 300px;
  overflow: auto;
  border-radius: $radius-2px;
  border: 1px solid $input-border-color;
}

li {
  list-style: none;
  box-sizing: content-box;
  margin: 0;
  padding: 0 0 0 8px;
  width: 100%;
  height: 24px;
  line-height: 24px;
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: backgroundColor 0.3s;
  color: $text-default;
}

li:nth-child(odd) {
  background-color: $bg-main;
}

button {
  @include flex-xy-center;
  min-width: 86px;
  padding: 8px 10px;
  text-align: center;
  border-radius: $radius-2px;
  color: $text-reverse;
  outline: 0;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  text-transform: none;
  border-color: transparent;
}

button[type="default"] {
  background-color: $brand-default;
}

button[type="primary"] {
  background-color: $brand-primary;
}

button[type="danger"] {
  background-color: $brand-danger;
}

button[type="warning"] {
  background-color: $brand-warning;
}

button[type="success"] {
  background-color: $brand-success;
}

.icons {
  display: flex;
  padding: 16px;

  > svg {
    width: 32px;
    height: 32px;
    fill: $icon-default;
  }

  > svg:hover {
    fill: $brand-primary;
  }

  > svg:not(:last-of-type) {
    margin-right: 12px;
  }
}

.Home-button-group {
  @include flex-xy-center;
  height: 50px;

  > button {
    line-height: 1;
    border-radius: 2px;
    color: $text-default;
    border: 1px solid $brand-default;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    position: relative;
    padding: 4px 8px;
    font-size: 12px;
    background-color: transparent;
    min-width: 60px;
    overflow: hidden;
  }

  > button:not(:last-child) {
    margin-right: 12px;
  }
}


@keyframes Home-logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.Home-content-color:not(:last-child) {
  margin-bottom: 16px;
}

.Home-content-color {
  display: flex;
  align-content: center;
  height: 32px;
  // margin-bottom: 16px;
  font-family: Consolas, Monaco, monospace;

  &-search {
    display: flex;
    align-content: center;
  }

  &-content {
    min-width: 350px;
    margin-right: 16px;
  }

  &-name {
    display: flex;
    align-items: center;
    line-height: 24px;
    color: $text-default;
  }

  &-note {
    line-height: 16px;
    font-size: 12px;
    color: var(--fui-text-color-assist);
  }

  &-palette {
    height: 32px;
    width: 120px;
    margin-right: 16px;
  }

  &-value {
    line-height: 32px;
  }
}